package br.com.hmcontabilidade.onlinev3.business;

import br.com.hmcontabilidade.onlinev3.domain.TipoProcuradoria;
import br.com.hmcontabilidade.onlinev3.persistence.TipoProcuradoriaDAO;
import br.gov.frameworkdemoiselle.annotation.Startup;
import br.gov.frameworkdemoiselle.stereotype.BusinessController;
import br.gov.frameworkdemoiselle.template.DelegateCrud;
import br.gov.frameworkdemoiselle.transaction.Transactional;

@BusinessController
public class TipoProcuradoriaBC extends DelegateCrud<TipoProcuradoria, Long, TipoProcuradoriaDAO> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Startup
	@Transactional
	public void load() {
		if (findAll().isEmpty()) {

			insert(new TipoProcuradoria("Fiscal"));
		}
	}

}
